<?php

class LoginForm extends BaseForm
{
	public function configure()
	{
		$this->setWidgets(array(
			'correo'		=> new sfWidgetFormInputText(),
			'contrasena'	=> new sfWidgetFormInputPassword()
		));
	
		$this->widgetSchema->setNameFormat('contact_anon[%s]');

		$this->setValidators(array(
			'correo' 		=> new sfValidatorEmail(),
			'correo'		=> new sfValidatorString(array(), array(
				'required'   => 'El correo es requerido.'
			)),
			'contrasena'	=> new sfValidatorString(array(), array(
				'required'   => 'El nombre es requerido.'
			))
		));
		
		$this->widgetSchema->setNameFormat('login[%s]');
    	$this->widgetSchema->setFormFormatterName('list');
	}
	
}